package com.fun.feifun.modules.business.dao;

import com.fun.feifun.modules.business.model.BusinessUserGoods;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fun.feifun.modules.business.model.dto.BusinessAmountRecordDto;
import com.fun.feifun.modules.business.model.dto.BusinessUserGoodsDto;
import com.fun.feifun.modules.business.model.param.BusinessAmountRecordPage;
import com.fun.feifun.modules.business.model.param.BusinessUserParam;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 业务用户商品信息 Mapper 接口
 * </p>
 *
 * @author wkf
 * @since 2024-05-29
 */
public interface BusinessUserGoodsMapper extends BaseMapper<BusinessUserGoods> {

    Integer selectDtoCount(@Param("item") BusinessAmountRecordPage page);

    List<BusinessUserGoodsDto> selectDtoPage(@Param("item") BusinessAmountRecordPage item, @Param("size") Integer size, @Param("page")Integer page);

    List<BusinessUserGoodsDto> selectUserDtoList(@Param("item") BusinessUserParam item);

    @MapKey("getUserGoodsCount")
    List<Map<String, Long>> getUserGoodsCount(@Param("usreIds") List<Long> usreIds) ;

    List<BusinessUserGoodsDto> selectSupplierDtoList(@Param("item") BusinessUserParam item);
}
